package com.xian.manage.service.impl;

import java.util.List;
import com.xian.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.xian.manage.mapper.PlaygroundMapper;
import com.xian.manage.domain.Playground;
import com.xian.manage.service.IPlaygroundService;

/**
 * 建筑艺术Service业务层处理
 * 
 * @author Hanys
 * @date 2025-04-09
 */
@Service
public class PlaygroundServiceImpl implements IPlaygroundService 
{
    @Autowired
    private PlaygroundMapper playgroundMapper;

    /**
     * 查询建筑艺术
     * 
     * @param id 建筑艺术主键
     * @return 建筑艺术
     */
    @Override
    public Playground selectPlaygroundById(Long id)
    {
        return playgroundMapper.selectPlaygroundById(id);
    }

    /**
     * 查询建筑艺术列表
     * 
     * @param playground 建筑艺术
     * @return 建筑艺术
     */
    @Override
    public List<Playground> selectPlaygroundList(Playground playground)
    {
        return playgroundMapper.selectPlaygroundList(playground);
    }

    /**
     * 新增建筑艺术
     * 
     * @param playground 建筑艺术
     * @return 结果
     */
    @Override
    public int insertPlayground(Playground playground)
    {
        playground.setCreateTime(DateUtils.getNowDate());
        return playgroundMapper.insertPlayground(playground);
    }

    /**
     * 修改建筑艺术
     * 
     * @param playground 建筑艺术
     * @return 结果
     */
    @Override
    public int updatePlayground(Playground playground)
    {
        playground.setUpdateTime(DateUtils.getNowDate());
        return playgroundMapper.updatePlayground(playground);
    }

    /**
     * 批量删除建筑艺术
     * 
     * @param ids 需要删除的建筑艺术主键
     * @return 结果
     */
    @Override
    public int deletePlaygroundByIds(Long[] ids)
    {
        return playgroundMapper.deletePlaygroundByIds(ids);
    }

    /**
     * 删除建筑艺术信息
     * 
     * @param id 建筑艺术主键
     * @return 结果
     */
    @Override
    public int deletePlaygroundById(Long id)
    {
        return playgroundMapper.deletePlaygroundById(id);
    }
}
